package com.study.springcloud.feign;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author raoluping
 * @Date 2017/10/26 13:56
 * @Description
 */
@RestController
@RequestMapping("/feign")
public class ConsumerControllerByFeign {
  @Autowired
  private IRemoteInterface remoteInterface;

  @RequestMapping("/sayHi")
  // http://localhost:2223/feign/sayHi?name=22
  public String sayHi(@RequestParam String name) {
    return remoteInterface.hello(name);
  }
}
